<template>
  <div class="userInfo">
    用户详情
  </div>
</template>

<script>
import jwt_decode from "jwt-decode";
export default {
  name: "userInfo",
  data () {
    return {

    }
  },
  methods: {
    userInit () {
      this.$axios.get("http://localhost:5000/api/users/current/" + jwt_decode(localStorage.getItem("userToken")).id).then(res => {
        console.log(res.data);
      })
      // console.log(jwt_decode(localStorage.getItem("userToken")).id);
    }
  },
  mounted () {
    this.userInit();
  }
}
</script>

<style>
</style>